package cn.shop.alibaba.feign;

import cn.shop.alibaba.beans.Product;
import cn.shop.alibaba.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "server-product",fallback = ProductServiceFeignFallBack.class)
public interface ProductServiceFeign {

    @GetMapping(value = "/product/{pid}")
    Product getProductById(@PathVariable("pid") Long pid);

    @GetMapping(value = "/update_count/{pid}/{count}")
    public Result<Integer> update_count(@PathVariable("pid") Long pid, @PathVariable("count") Integer count);
}
